#ifndef MTIME_H
#define MTIME_H

#include "poolableobject.h"
#include "qkeymetro.h"

class MTime : public PoolableObject
{
public:
    MTime(int b, int ub);
    MTime(int rawValue);
    MTime();
    enum {RESOLUTION = 40000};
    inline int getBeats();
    inline int getSubBeats(); // RESOLUTION subbeats in one beat
    inline int getRawValue(); // = RESOLUTION * beats + subbits; so it's 7 hours for 120 bpm
    static inline int getBeats(int);
    static inline int getSubBeats(int); // RESOLUTION subbeats in one beat
    static inline int getRawValue(int b,int sb);
    inline void operator=(int rawValue);
    void setValue(int b, int sb);



private:
    int value_;
};

#endif // MTIME_H
